<template>
  <el-dialog
    title="选择抄送人"
    v-model="visible"
    width="850px"
    append-to-body
    destroy-on-close
  >
    <c-general-copies
      ref="copiesField"
      :copiesData="copiesData"
    ></c-general-copies>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="visible = false">取 消</el-button>
        <el-button type="primary" @click="submitCopies">确 定</el-button>
      </span>
    </template>
  </el-dialog>
</template>

<script>
export default {
  name: "userCopiesDialog",
  data() {
    return {
      copiesData: null,
      roleCopiesData: null,
    };
  },
  methods: {
    // 保存抄送人设置
    submitCopies() {
      // const copiesData = this.$refs.copiesField.copiesData;
      // this.modeler.updateProperties({
      //   copies: copiesData.length === 0 ? undefined : copiesData.join(","),
      // });

      // const roleCopiesData = this.$refs.copiesField.roleCopiesData;
      // this.modeler.updateProperties({
      //   roleCopiesData:
      //     roleCopiesData.length === 0 ? undefined : roleCopiesData.join(","),
      // });
      
      this.visible = false;
      this.copiesDataReset();
    },
  },
};
</script>

<style scoped lang="scss">
:deep(.check-box-content) {
  display: flex !important;
  & > label {
    flex: 0 0 80px;
  }
  .el-form-item_contaner .el-checkbox-group {
    .el-checkbox {
      margin-right: 10px;
      .el-checkbox__label {
        padding-left: 5px;
      }
    }
  }
}
</style>
